surface: Small simplification
authorMatthias Clasen <mclasen@redhat.com>
Sun, 24 Mar 2019 20:30:32 +0000 (16:30 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 28 May 2019 20:25:14 +0000 (20:25 +0000)
No more special-casing of state setting.

gdk/gdksurface.c

index 9d9a353e0718d1c51f8c83f67836aeb7c8bb30de..ce2b4b9f30dc4e263620bdb2c1628278171967a8 100644 (file)
@@ -4079,20 +4079,7 @@ gdk_surface_set_state (GdkSurface      *surface,
 
   _gdk_surface_update_viewable (surface);
 
-  /* We only really send the event to toplevels, since
-   * all the surface states don't apply to non-toplevels.
-   * Non-toplevels do use the GDK_SURFACE_STATE_WITHDRAWN flag
-   * internally so we needed to update surface->state.
-   */
-  switch (surface->surface_type)
-    {
-    case GDK_SURFACE_TOPLEVEL:
-    case GDK_SURFACE_TEMP: /* ? */
-      g_object_notify_by_pspec (G_OBJECT (surface), properties[PROP_STATE]);
-      break;
-    default:
-      break;
-    }
+  g_object_notify_by_pspec (G_OBJECT (surface), properties[PROP_STATE]);
 
   if (was_mapped != mapped)
     g_object_notify_by_pspec (G_OBJECT (surface), properties[PROP_MAPPED]);